import request from '@/utils/request'

// 查询门店信息主列表
export function listRoom(query) {
  return request({
    url: 'admin/platform/room/list',
    method: 'get',
    params: query
  })
}

// 查询门店信息主详细
export function getRoom(id) {
  return request({
    url: 'admin/platform/room/' + id,
    method: 'get'
  })
}

// 新增门店信息主
export function addRoom(data) {
  return request({
    url: 'admin/platform/room/add',
    method: 'post',
    data: data
  })
}

// 修改门店信息主
export function updateRoom(data) {
  return request({
    url: 'admin/platform/room/edit',
    method: 'put',
    data: data
  })
}

// 删除门店信息主
export function delRoom(id) {
  return request({
    url: 'admin/platform/room/' + id,
    method: 'delete'
  })
}
//获取所有门店配送范围列表(经纬度数组对象列表) /api/admin/platform/room/delivery_range/list
export function listRoomDeliveryRange(query) {
  return request({
    url: 'admin/platform/room/delivery_range/list',
    method: 'get',
    params: query
  })
}